package com.xiaomi.back.service.describes.impl;

import com.xiaomi.back.dao.describes.DescribesBackDao;
import com.xiaomi.back.service.describes.DescribesBack;
import com.xiaomi.pojo.Describes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DescribesBackImpl implements DescribesBack {
    @Autowired
    private DescribesBackDao describesBackDao;

    //按上下架 查询商品
    @Override
    public List<Describes> getAllDescribes(int id) {
        return describesBackDao.getAllDescribes(id);
    }


    //模糊查上架商品
    @Override
    public List<Describes> GetDescribes(String comname,int id) {
        return describesBackDao.GetDescribes(comname,id);
    }


    //模糊查下架商品
    @Override
    public List<Describes> GetComms(String comname,int id) {
        return describesBackDao.GetComms(comname,id);
    }

    //根据deid查商品信息
    @Override
    public Describes getDeid(int deid) {
        return describesBackDao.getDeid(deid);
    }

    @Override
    public int UpCount(int count, int deid) {
        return describesBackDao.UpCount(count,deid);
    }

    @Override
    public int getAddcart() {
        return describesBackDao.getAddcart();
    }

    @Override
    public int UpcartRecomm(int tj, int deid) {
        return describesBackDao.UpcartRecomm(tj,deid);
    }

    @Override
    public List<Describes> getTui() {
        return describesBackDao.getTui();
    }
}
